<template>
  <div>
    <div class="w-100 flexLeft echarts-head-1">10天订单</div>
    <div id="max" class="Tmok"></div>
    <div class="botton-1"></div>
  </div>
</template>
<script>
import * as echarts from "echarts";

export default {
  data() {
    return {};
  },
  mounted() {
    this.mcat();
  },
  methods: {
    mcat() {
      var myList = echarts.init(document.getElementById("max"));
      myList.setOption({
        title: {
          text: "订单数",
          padding: [15, 30],
          textStyle: {
            fontSize: 14,
            fontWeight: "100",
          },
        },
        tooltip: {
          trigger: "axis",
        },
        legend: {
          data: ["Email", "Union Ads"],
        },
        grid: {
          left: "3%",
          right: "4%",
          bottom: "3%",
          containLabel: true,
        },
        toolbox: {
          right: 20,
          top: 5,
          feature: { saveAsImage: { type: "png" } },
        },
        xAxis: {
          type: "category",
          boundaryGap: false,
          data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
        },
        yAxis: {
          type: "value",
        },
        series: [
          {
            name: "Email",
            type: "line",
            stack: "Total",
            data: [120, 132, 101, 134, 90, 230, 210],
          },
          {
            name: "Union Ads",
            type: "line",
            stack: "Total",
            data: [220, 182, 191, 100, 500, 290, 250],
          },
        ],
      });
      window.addEventListener("resize", function () {
        myList.resize();
      });
    },
  },
};
</script>
<style scoped>
.echarts-head-1 {
  border-bottom: 1px solid #ebeef5;
  height: 49px;
  padding-left: 15px;
  font-size: 15px;
}

.Tmok {
  height: 350px;
  //width: 100%;
}

.botton-1 {
  width: 100%;
  height: 30px;
  background: #eeeeee;
}
</style>
